﻿using System;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Concordia.Models._Alert;
using Concordia.ViewModels;

namespace Concordia.Controllers
{
    public class _AlertController : Controller
    {
        //
        // GET: /_Alert/

        public ActionResult AlertPanel()
        {
            //TODO:  Redirect login
            if (Session == null) return View();
            var vm = (AccountViewModel)Session["AccountViewModel"];

            var context = new AlertContextDataContext();
            var result = context.WEB_SEL_CS_MAIN_ALERT_MANUAL(vm.LoanKey, vm.Now).FirstOrDefault();

            return View(result);
        }
    }
}
